﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/twitter/TwitterMaster.master"
    AutoEventWireup="true" CodeBehind="Import.aspx.cs" Inherits="Yonkly.Views.twitter.Import" %>

<%@ Import Namespace="Yonkly.Controllers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript" src='<%=Page.ResolveClientUrl("~/content/scripts/twitterimport.js")%>'></script>
    <script type="text/javascript" src='<%=Page.ResolveClientUrl("~/content/scripts/jquery.timer.js")%>'></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <h2>
        Twitter Import</h2>
    <%if (ViewData.Model.IsAuthenticated)
      {%>
    <%if (string.IsNullOrEmpty(ViewData.Model.LoggedInUser.TwitterUserName) || string.IsNullOrEmpty(ViewData.Model.LoggedInUser.TwitterPassword))
      {%>
    You need to setup your twitter username and passwords before you can import your
    tweets. To setup your twitter information
    <%=Html.ActionLink<ProfileController>(p => p.Edit(), "click here")%>
    <%}//password or username are null
      else
      { %>
    <input type="button" name="btnImport" id="btnImport" value="begin import" onclick="javascript:TwitterImport.beginImport();" />
    <br />
    <div id="importStatus">
    </div>
    <%}//twitter password and usernames are available %>
    <%}// is authenticated
      else
      { %>
    You must be logged in to import your twitter messages. Please login first.
    <%} %>
</asp:Content>
